import {request} from "../request";
import {utils} from "../../common/utils";

// 排班表查询 需要打卡 日期 时间
export function initDay(wid,mon){
    mon = 0
    console.log("排班表查询 " , wid,mon)
    return request({
        url:'/workSchedule/date-control',
        method:'get',
        params:{
            wid,
            mon
        }
    })
}

// 签到表查询是否打卡
export function initCheckDate(wid){
    console.log("签到表查询是否打卡 ", wid)
    return request({
        url:'/signIn/query',
        method:'get',
        params:{
            wid
        }
    })
}

// 新增签到表记录
export function addCheckDate(workid,daydate,dayTime){
    let SignInParams = {
        workId : workid,
        signDate :daydate,
        signTime : dayTime,
        status : 0
    };
    console.log("SignInParams " , SignInParams)
    return request({
        url:'/signIn/add',
        method:'post',
        data: SignInParams
    })
}